<include file="Public/min-header"/>

<div class="wrapper">
    <include file="Public/breadcrumb"/>
	<section class="content">
       <div class="row">
       		<div class="col-xs-12">
	       		<div class="box">
	           	<div class="box-header">
	               <nav class="navbar navbar-default">	     
				        <div class="collapse navbar-collapse">
				          <form class="navbar-form form-inline search-form2" id="search-form2" method="post">
				            <div class="form-group">
				              	<input type="text" name="keywords" value="{:I('keywords')}" class="form-control" placeholder="搜索">
				            </div>
				            <button type="submit" class="btn btn-default">提交</button>
				            <div class="form-group pull-right">

				            </div>		          
				          </form>		
				      	</div>
	    			</nav>                
	             </div>
                 <div id="ajax_return">

                </div>
	             <!-- /.box-header -->
	     <!--        <div class="box-body">	             -->
	     <!--      		<div class="row">-->
	     <!--       	<div class="col-sm-12">-->
		    <!--          <table id="list-table" class="table table-bordered table-striped dataTable">-->
		    <!--             <thead>-->
		    <!--               <tr role="row">-->
			   <!--                <th class="sorting" tabindex="0" style="text-align: center;">活动名称</th>-->
			   <!--                <th class="sorting" tabindex="0" style="text-align: center;">活动类型</th>-->
			   <!--                <th class="sorting" tabindex="0" style="text-align: center;">店铺名称</th>-->
			   <!--                <th class="sorting" tabindex="0" style="text-align: center;">折扣率%</th>-->
						<!--	   <th class="sorting" tabindex="0" style="text-align: center;">限购数</th>-->
			   <!--                <th class="sorting" tabindex="0" style="text-align: center;">开始时间</th>-->
			   <!--                <th class="sorting" tabindex="0" style="text-align: center;">结束时间</th>-->
			   <!--                <th style="text-align: center;">状态</th>-->
			   <!--                <th style="text-align: center;">排序</th>-->
			   <!--                <th class="sorting" tabindex="0" style="text-align: center;">操作</th>-->
		    <!--               </tr>-->
		    <!--             </thead>-->

						<!--<tbody>-->
						<!--  <foreach name="prom_list" item="vo" key="k" >-->
						<!--  	<tr role="row" align="center">-->
		    <!--                 <td>{$vo.name|getSubstr=0,30}</td>-->
		    <!--                 <td>{$parse_type[$vo[type]]}</td>-->
		    <!--                 <td>{$vo.store_name}</td>-->
		    <!--                 <td style="color: green;">{$vo.expression}</td>-->
						<!--	 <td style="color: red;">{$vo.xiangou}</td>-->
						<!--		<td>{$vo.start_time|date='Y-m-d H:i',###}</td>-->
						<!--		<td>{$vo.end_time|date='Y-m-d H:i',###}</td>-->
						<!--	 <td>{$vo.state}</td>-->
						<!--		<td class="text-left"><input type="text" onchange="updateSort('prom_goods','id','{$vo.id}','orderby',this)"  onkeyup="this.value=this.value.replace(/[^\d]/g,'')" onpaste="this.value=this.value.replace(/[^\d]/g,'')" maxlength="3" value="{$vo.orderby}" class="input-sm" style="width: 50px;text-align: center;" /></td>-->

						<!--		<td>-->
		    <!--                  <a href="javascript:;" data-url="{:U('Promotion/dget_goods',array('id'=>$vo['id']))}" data-toggle="tooltip" title="" class="btn btn-info goods_list">查看商品</a>-->
						<!--		</td>-->
		    <!--               </tr>-->
		    <!--              </foreach>-->
		    <!--               </tbody>-->
		    <!--           </table>-->
	     <!--          </div>-->
	     <!--     </div>-->
      <!--        <div class="row">-->
      <!--        	    <div class="col-sm-6 text-left"></div>-->
      <!--              <div class="col-sm-6 text-right">{$page}</div>		-->
      <!--        </div>-->
	     <!--     </div><!-- /.box-body -->
	        </div><!-- /.box -->
       	</div>
       </div>
   </section>
</div>
<script>
 $(document).ready(function(){
        ajax_get_table('search-form2',1);
		
    });
    // ajax 抓取页面
    function ajax_get_table(tab,page){
        layer.load()
        cur_page = page; //当前页面 保存为全局变量
            $.ajax({
                type : "POST",
                url:"/index.php/Admin/Promotion/ajaxdaily_goods_list/p/"+page,//+tab,
                data : $('#'+tab).serialize(),// 你的formid
                success: function(data){
                    layer.closeAll('loading');
                    try {
                        let json = JSON.parse(data);
                        if(json && json.code == 0){
                            layer.msg(json.msg, {icon: 0});
                            return
                        }
                    }catch (e){
                        $("#ajax_return").html('');
                        $("#ajax_return").append(data);
                    }
                }
            });
    }
$('.goods_list').click(function(){
    var url = $(this).attr('data-url');
    layer.open({
        type: 2,
        title: '活动关联商品列表',
        shadeClose: true,
        shade: 0.5,
        area: ['70%', '72%'],
        content: url, 
    });
});
</script>
</body>
</html>